package lab02.test19;

/**
 * Created by dell on 2017/10/26.
 */
public class Test {
    public static void main(String[] args) {
        //大小写转换 并倒序输出
        String result="HelloWorld";
        //DLROwOLLEh
        char tmp;
        int i;
        for(i=0;i<result.length();i++){
            tmp=result.charAt(i);
            if(tmp>='A'&&tmp<='Z'){
                System.out.print((char)(tmp+32));
            }
            else if(tmp>='a'&&tmp<='z'){
                System.out.print((char)(tmp-32));
            }
        }
        System.out.println("\n");
        String Str="hELLOwORLD";
        StringBuilder sb=new StringBuilder(Str);
        System.out.print(sb.reverse().toString());
    }
}
